/* 
 * Multiply Strings
 */

#include "../func.h"

typedef vector<int> bigint;

bigint operator*(bigint const &x, bigint const &y)
{
    bigint z(x.size() + y.size());
    for (size_t i = 0; i < x.size(); ++i)
        for (size_t j = 0; j < y.size(); ++j)
        {
            z[i + j] += x[i] * y[j];
            z[i + j + 1] += z[i + j] / 10;
            z[i + j] %= 10;
        }

    return z;
}